#!/bin/sh

modules=`ls -l | grep ^d | sed 's/.* //'`
nobuild="\(doc\|plugins\|sceney\|build\)"

for i in $modules; do
	foo=`echo $i | grep -v "$nobuild"`
	if [ -n "$foo" ]; then
		echo "chdir: $i"
		/bin/sh -c "cd $i && ./configure && make $*"
	fi
done

plugins=`ls -l plugins | grep ^d | sed 's/.* //'`

for i in $plugins; do
	echo "chdir: plugins/$i"
	/bin/sh -c "cd plugins/$i && ./makeall $*"
done
